/**
 * 文件数据
 */
package com.flute.framework;

import java.io.IOException;

import com.flute.framework.business.TimerFileData;
import com.flute.framework.exception.ConfigurationParseException;

/**
 * @author Jazz
 * 
 */
public class FileDataMain {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
//		args = new String[] {"albumFileDataPreparer","lyricFileDataPreparer","singerFileDataPreparer","songFileDataPreparer"};
//		args = new String[] {"albumFileDataPreparer"};
//		args = new String[] {"lyricFileDataPreparer"};
//		args = new String[] {"singerFileDataPreparer"};
//		args = new String[] {"songFileDataPreparer"};
//		args = new String[] {"imageFileDataPreparer"};
//		args = new String[] {"newsFileDataPreparer"};
//		args = new String[] {"videoFileDataPreparer"};
		
		if (args.length > 0) {
			for (int i = 0; i < args.length; i++) {
				TimerFileData fileData;
				try {
					fileData = FileData.getInstance().getTimerFileData(args[i]);
					if (fileData != null) {
						fileData.start();
					} else {
						System.err.println("找不到索引,索引名字是" + args[i]);
					}
				} catch (ConfigurationParseException e) {
					e.printStackTrace();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}
	}

}
